import { defineStore, storeToRefs } from 'pinia';

export const epStore = defineStore('epStore', {
    // data
    state: () => {
        return {
            token: "",
            user_account: "",
            display_page_flag: null,
        }
    },
    // 方法
    actions: {
    },
    // 计算属性
    getters: {

        // 获取token
        getToken() {
            let token = localStorage.getItem("TOKEN") ? localStorage.getItem("TOKEN") : null;
            return token
        },
        // 获取用户名
        getUserAccount() {
            let user_account = localStorage.getItem("USER_ACCOUNT") ? localStorage.getItem("LOGIN_REMEMBER") : "";
            return user_account
        }
    }
})